package Pet.Management.repository;

import Pet.Management.domain.entity.Notice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface NoticeRepository extends JpaRepository<Notice, Long> {
    
    // 根据标题模糊查询
    Page<Notice> findByTitleContaining(String title, Pageable pageable);
    
    // 根据状态查询
    Page<Notice> findByStatus(String status, Pageable pageable);
    
    // 根据标题和状态查询
    Page<Notice> findByTitleContainingAndStatus(String title, String status, Pageable pageable);
} 